	<bean id="${DruidDataSource.id}"
		class="com.alibaba.druid.pool.DruidDataSource"
		init-method="init" destroy-method="close">
		<#assign dataSourceUrl = DruidDataSource.url?replace('&','&amp;' )/>
		<#assign dataSourceUrl = DruidDataSource.url?replace('&amp;amp;','&amp;' )/>
		<property name="url"		value="${dataSourceUrl}" />
		<property name="username"	value="${DruidDataSource.username}" />
		<property name="password"	value="${DruidDataSource.password}" />	
		<#if DruidDataSource.initialSize??>
		<property name="initialSize"	value="${DruidDataSource.initialSize}" />
		</#if>
		<#if DruidDataSource.minIdle??>
		<property name="minIdle"		value="${DruidDataSource.minIdle}" />
		</#if>
		<#if DruidDataSource.maxActive??>
		<property name="maxActive"		value="${DruidDataSource.maxActive}" />
		</#if>
		<#if DruidDataSource.maxWait??>
		<property name="maxWait"		value="${DruidDataSource.maxWait}" />
		</#if>
		<#if DruidDataSource.poolPreparedStatements??>
		<property name="poolPreparedStatements"			value="${DruidDataSource.poolPreparedStatements?c}" />
		</#if>
		<#if DruidDataSource.timeBetweenEvictionRunsMillis??>
		<property name="timeBetweenEvictionRunsMillis"	value="${DruidDataSource.timeBetweenEvictionRunsMillis}" />
		</#if>
		<#if DruidDataSource.maxOpenPreparedStatements??>
		<property name="maxOpenPreparedStatements"		value="${DruidDataSource.maxOpenPreparedStatements}" />
		</#if>
		<#if DruidDataSource.url[5..10]=="oracle">
		<property name="validationQuery"	value="SELECT 1 from dual" />
		<#else>
		<property name="validationQuery"	value="SELECT 'x'" />
		</#if>
		<#if DruidDataSource.testOnBorrow??>
		<property name="testOnBorrow"	value="${DruidDataSource.testOnBorrow?c}" />
		</#if>
		<#if DruidDataSource.testOnReturn??>
		<property name="testOnReturn"	value="${DruidDataSource.testOnReturn?c}" />
		</#if>
		<#if DruidDataSource.testWhileIdle??>
		<property name="testWhileIdle"	value="${DruidDataSource.testWhileIdle?c}" />
		</#if>
		<#if DruidDataSource.filters??>
		<property name="filters"		value="${DruidDataSource.filters}" />
		</#if>
	</bean>
